﻿@model IEnumerable<ArchiveItem>
@if (Model != null && Model.Count()>0)
{
<div class="tn-box tn-widget tn-widget-content tn-corner-all spb-blog-archive">
    <div class="tn-box-header tn-widget-header tn-corner-top tn-border-bottom">
    <h3 class="tn-helper-reset">存档</h3>
    </div>
    <div class="tn-box-content tn-widget-content tn-corner-bottom">
    <ul class="tn-list">
    @foreach (ArchiveItem archiveItem in Model)
        { 
        string archive = archiveItem.Year+"年";
        if (archiveItem.Month > 0)
        {
            archive += archiveItem.Month+"月";
        }
        <li><a href="@SiteUrls.Instance().BlogList(Url.SpaceKey(), ListType.Archive,null, archiveItem.Year, archiveItem.Month)">@archive<span class="tn-text-note">（@archiveItem.Count）</span></a></li>
    }
    </ul>
    </div>
</div>
}